package org.example.config;

import org.example.service.Impl.PersonServiceImpl;
import org.example.service.PersonService;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
public class MyAppConfig {
  @Bean
    public PersonService personService(){
      System.out.println("在容器中添加了一个组件:peronService");
      return new PersonServiceImpl();
  }

}
